Chest pain can also be caused by anxiety and panic disorders, which can produce symptoms that mimic those of a heart attack.